﻿@model Timesheet.Domain.Task

@{
    ViewBag.Title = "Create Task";
}

<h1>Create <span>Task</span></h1>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-field">
            @Html.DropDownListFor(e=>e.Type, (SelectList)ViewBag.Types, "Type")
            @Html.ValidationMessageFor(model => model.Type)
        </div>

    
        <div class="editor-field">
            @Html.TextBoxFor(model => model.CreateDate, new { placeholder = "Starts" })
            @*@Html.EditorFor(model => model.CreateDate)*@
            @Html.ValidationMessageFor(model => model.CreateDate)
        </div>

        <div class="editor-field">
            @Html.TextBoxFor(model => model.CompleteDate, new { placeholder = "Ends" })
            @*@Html.EditorFor(model => model.CompleteDate)*@
            @Html.ValidationMessageFor(model => model.CompleteDate)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
